import random

num1 = random.randint(2048, 4095)
print(num1)
print("亮灯情况：{0:b}".format(num1))
num2 = "{0:b}".format(num1)
i = random.choice([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
print("你打中了第 %d 个灯" % (i+1))
print("弹珠打中的情况：", num2[i])
if int(num2[i]) == 1:
    print("恭喜你，赢了！")
elif int(num2[i]) == 0:
    print("很抱歉，你输了~")